package com.hz.ys_statistics.action;


import com.hz.framework.MyAction.BaseAction;
import com.hz.framework.dao.CommonDao;
import com.hz.ys_statistics.dao.StatisticsDao;

/**
 * *****************************************************************************
 *               Copyright(c) 2010 by 哈尔滨华泽数码科技有限公司.
 *                       All rights reserved.
 *******************************************************************************
 *     File Name         :  com.hz.ys_stock.action.StatisticsAction.java
 *     Description(说明)	: 原材料管理 action
 * -----------------------------------------------------------------------------
 *     No.        Date              Revised by           Description	
 *     			  Jul 29, 2011           韩飞              Created
 *****************************************************************************
 */
public class StatisticsAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	private Object pagList = null;

	/**
	 * @author 韩飞
	 * @time Nov 19, 2011	
	 * @return
	 * @throws Exception 
	 * 方法功能: 进料统计
	 */
	public String Purchase_stat() throws Exception {
		boolean selflag = true;
		boolean pagflag = false;
		String rn = "";
		StatisticsDao sd = new StatisticsDao();
		String operate = CommonDao.isnull(request.getParameter("operate"));
//		默认列表页面
		if(selflag){
			rn = SUCCESS;
			pagList = sd.SelPurchase(request);
			pagflag = true;
		}
//		配置分页
		if(pagflag){
			doAllSearchList(request, "listinfo", pagList, "jdbc");
		}
		
		return rn;
	}
	
	/**
	 * @author 韩飞
	 * @time Nov 19, 2011	
	 * @return
	 * @throws Exception 
	 * 方法功能: 收入支出统计
	 */
	public String Financial_stat() throws Exception {
		boolean selflag = true;
		boolean pagflag = false;
		StatisticsDao sd = new StatisticsDao();
//		默认列表页面
		if(selflag){
				
//			生成查询资金信息
			pagList = sd.SelFinancial(request);
			pagflag = true;
		}
//		配置分页
		if(pagflag){
			doAllSearchList(request, "listinfo", pagList, "jdbc",32);
		}
		
		return SUCCESS;
	}
	/**
	 * @author 韩飞
	 * @time Nov 19, 2011	
	 * @return
	 * @throws Exception 
	 * 方法功能: 客户订单统计
	 */
	public String ClientOrder_stat() throws Exception {
		boolean selflag = true;
		boolean pagflag = false;
		StatisticsDao sd = new StatisticsDao();
//		默认列表页面
		if(selflag){
				
//			生成查询资金信息
			pagList = sd.SelClientOrder(request);
			pagflag = true;
		}
//		配置分页
		if(pagflag){
			doAllSearchList(request, "listinfo", pagList, "jdbc",32);
		}
		
		return SUCCESS;
	}
	
	
}
